<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改会议室信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${meetingRoomInfo}">
            <input name="roomId" th:field="*{roomId}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">会议室名称：</label>
                    <div class="col-sm-8">
                        <input name="roomName" th:field="*{roomName}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>

            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">会议室状态：</label>
                    <div class="col-sm-8">
                        <select name="status" th:field="*{status}" class="form-control">
                            <option value="可使用" th:selected="${meetingRoomInfo.status == '可使用'}">可使用</option>
                            <option value="正在使用" th:selected="${meetingRoomInfo.status == '正在使用'}">正在使用</option>
                            <option value="维修中" th:selected="${meetingRoomInfo.status == '维修中'}">维修中</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">容纳人数：</label>
                    <div class="col-sm-8">
                        <input name="capacity" th:field="*{capacity}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">位置：</label>
                    <div class="col-sm-8">
                        <input name="location" th:field="*{location}" class="form-control" type="text">
                    </div>
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/info";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
            }
        }
    </script>
</body>
</html>